<?php
session_start();
require_once("../firelynx.php");

$page = fily_XMLConverter::convertFile("xml.xml");
$table = $page->getControlBySid('table');


$_SESSION["data"] = array (
   array ("value 1", "value 2", "value 3"),
   array ("value 1", "value 2", "value 3"),
   array ("value 1", "value 2", "value 3")
);
$i = 0;
foreach ($_SESSION["data"] as  $rowData) {
        $row = $table->addRow();
        $row->setRequestFile("ajax.php?id=". $i );
        $controlList = fily_XMLConverter::convertFile("normalRow.xml", $row);
        $row->addUpdateTrigger($controlList->getControlBySid('link'),'click');
        // bind values
        $controlList->getControlBySid('column1')->setText($rowData[0]);
        $controlList->getControlBySid('column2')->setText($rowData[1]);
        $controlList->getControlBySid('column3')->setText($rowData[2]);
        $i++;
}

echo $page;

?>
